home *** CD-ROM | disk | FTP | other *** search
- From: lars.farm@nts.mh.se (Lars Farm)
- Message-ID: <AD312FF19668E835@sleipner.nts.mh.se>
- X-Original-Date: Sun, 28 Jan 1996 13:51:45 +0100
- Path: in1.uu.net!bounce-back
- Date: 29 Jan 96 00:03:58 GMT
- Approved: fjh@cs.mu.oz.au
- Newsgroups: comp.std.c++
- Subject: Re: Enhanced container functionality
- Organization: pv
- References: <ABJRD_mKQD@qsar.chem.msu.su> <3108EC3B.767@suphys.physics.su.oz.au>
- Content-Type: text/plain; charset=iso-8859-1
- Content-Transfer-Encoding: 8bit
- X-Auth: PGPMoose V1.1 PGP comp.std.c++
- iQBFAgUBMQwO/+EDnX0m9pzZAQHQmwF+If5fL5sY521Ul6+arqKU+xO1p0bFGBTD
- 2ob8WsGvSaRQxnFH9PTarSuws16bOfHh
- =3atw
-
- In article <3108EC3B.767@suphys.physics.su.oz.au>,
- John Max Skaller <maxtal@suphys.physics.su.oz.au> wrote:
-
- >Eugene Radchenko wrote:
- >> Having used the STL for some time, I have come to greatly missing:
- >
- >> First, it is the ability to (easily) flush the entire container
- >> void erase() { erase(begin(), end()); }
- >
- >> Second, it is the 'post-factum' equivalents to some constructors
- >> void assign(size_type n, T t = T());
- >> void assign(const_iterator first, const_iterator last);
- >> etc. - putting the container into the same state as the one it would have
- >> after the respective constructor.
- >> I think these features deserve inclusion.
- >
- >I find myself tending to agree -- so I'll look into
- >including these facilities in UESTL. It is too late
- >for non-essential significant changes to the C++ WP.
-
- They are already in, according to the html-september draft
- found at cygnus. Except erase() is called clear(). One example:
-
- 23.2.3 Template class list [lib.list]
- ...
- namespace std {
- template <class T, class Allocator = allocator>
- class list {
- ...
- // _lib.list.cons_ construct/copy/destroy:
- ...
- template <class InputIterator>
- void assign(InputIterator first, InputIterator last);
- template <class Size, class T>
- void assign(Size n, const T& t = T());
- ...
- // _lib.list.modifiers_ modifiers:
- ...
- void clear();
-
-
-
- --
- Lars Farm, lars.farm@nts.mh.se
- ---
- [ comp.std.c++ is moderated. Submission address: std-c++@ncar.ucar.edu.
- Contact address: std-c++-request@ncar.ucar.edu. The moderation policy
- is summarized in http://dogbert.lbl.gov/~matt/std-c++/policy.html. ]
-